<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
        <meta content="yes" name="apple-mobile-web-app-capable">
        <meta content="yes" name="apple-touch-fullscreen">
        <meta content="black" name="apple-mobile-web-app-status-bar-style">
        <meta content="telephone=no,email=no" name="format-detection">
        <meta name="description" content="">
        <meta name="keywords" content="">
        <title>中欧营销服务平台</title>
        <link rel="stylesheet" href="../static/style/personal.css">
    </head>

    <body>

        <div class="page page-normal">

            <section class="personal-main has-bottom">
                <div class="personal-product-detail">
                    <section class="personal-title">
                        <h1>中欧新蓝筹&nbsp;&nbsp;(001885)</h1>
                        <a href="javascript:void(0);" class="btn-focus active"></a>
                    </section>

                    <div class="fund-info flex-h">
                        <div class="flex-a-i">
                            <h1>最新净值</h1>
                            <h2>1.8379</h2>
                        </div>
                        <div class="flex-a-i">
                            <h1>日涨幅</h1>
                            <h2 class="red">0.29<span>%</span></h2>
                        </div>
                    </div>
                    <div class="refresh-date">更新时间：2016-10-12</div>

                    <div class="fund-tabnav flex-h">
                        <div class="tabnav-item flex-a-i active">净值走势图</div>
                        <div class="tabnav-item flex-a-i">历史净值（元）</div>
                    </div>
                    <div class="fund-tablist">
                        <div class="tablist-item active">
                            <div class="netvalue-title flex-h">
                                <p class="percent">最近一月：2.54%</p>
                                <p class="asset flex-a-i">单位净值</p>
                                <p class="total">累计净值</p>
                            </div>

                            <div class="tips">手指移至下方曲线图上，可查看每日具体净值</div>

                            <div class="echarts-box" id="echarts"></div>

                            <div class="echarts-navbar">
                                <div class="flex-h">
                                    <p class="flex-a-i active">近一月</p>
                                    <p class="flex-a-i">今年</p>
                                    <p class="flex-a-i">近一年</p>
                                    <p class="flex-a-i">至今</p>
                                </div>
                            </div>
                        </div>

                        <div class="tablist-item">
                            <div class="netvalue-list">
                                <ul>
                                    <li class="flex-h">
                                        <p class="date">2016-12-09</p>
                                        <p class="value">1.2150</p>
                                        <p class="percent flex-a-i red">0.58%</p>
                                    </li>
                                    <li class="flex-h">
                                        <p class="date">2016-12-08</p>
                                        <p class="value">1.2010</p>
                                        <p class="percent flex-a-i green">-0.58%</p>
                                    </li>
                                    <li class="flex-h">
                                        <p class="date">2016-12-09</p>
                                        <p class="value">1.2150</p>
                                        <p class="percent flex-a-i red">0.58%</p>
                                    </li>
                                    <li class="flex-h">
                                        <p class="date">2016-12-08</p>
                                        <p class="value">1.2010</p>
                                        <p class="percent flex-a-i green">-0.58%</p>
                                    </li>
                                    <li class="flex-h">
                                        <p class="date">2016-12-09</p>
                                        <p class="value">1.2150</p>
                                        <p class="percent flex-a-i red">0.58%</p>
                                    </li>
                                    <li class="flex-h">
                                        <p class="date">2016-12-08</p>
                                        <p class="value">1.2010</p>
                                        <p class="percent flex-a-i green">-0.58%</p>
                                    </li>
                                </ul>

                                <a href="javascript:void(0);" class="btn-more">查看更多</a>
                            </div>
                        </div>
                    </div>

                    <div class="recommend">
                        <div class="title flex-h">
                            <div class="flex-a-i">推荐理由</div>
                            <div class="btn-link">
                                <a href="javascript:void(0);" class="btn-more">查看更多</a>
                            </div>
                        </div>
                        <div class="desc">理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由理由</div>
                    </div>
                </div>
            </section>

            <div class="personal-product-detail-rate-box flex-h">
                <div class="flex-a-i">申购费率<span class="percent">1.60%</span><span class="discount">1折起</span></div>
                <div class="flex-a-i">定投费率<span class="percent">1.60%</span><span class="discount">0.5折起</span></div>
            </div>
            
            <section class="column-footer">
                <div class="navbar">
                    <ul class="flex-h">
                        <li class="flex-a-i">
                            <a href="#" class="link-home">首页</a>
                        </li>
                        <li class="flex-a-i">
                            <a href="javascript:void(0);" class="link-column">精华栏目</a>
                            <div class="submenu">
                                <a href="#" class="link-opinion"></a>
                                <a href="#" class="link-read"></a>
                                <a href="#" class="link-idea"></a>
                            </div>
                        </li>
                        <li class="flex-a-i">
                            <a href="#" class="link-my active">个人中心</a>
                        </li>
                    </ul>
                </div>
            </section>

        </div>


        <script src='../static/script/echarts/echarts.common.min.js'></script>
        <script src='../static/script/lib/jquery.2.0.0.min.js'></script>
        <script> 
            $(function() {
                // 
                $('.column-footer .navbar a.link-column').on('click', function() {
                    $(this).parent().find('.submenu').toggleClass('active');
                });

                // 
                $('.personal-title .btn-focus').on('click', function() {
                    $(this).toggleClass('active');
                });


                // fund-tab
                $('.fund-tabnav .tabnav-item').on('click', function() {
                    var _this = $(this),
                        _index = _this.index();

                    if(_this.hasClass('active')) {
                        return false;
                    } else {
                        _this.addClass('active').siblings().removeClass('active');
                        $('.fund-tablist .tablist-item').eq(_index).addClass('active').siblings().removeClass('active');
                    }
                });


                // chart nav
                $('.echarts-navbar p').on('click', function() {
                    var _this = $(this);

                    if(_this.hasClass('active')) {
                        return false;
                    } else {
                        _this.addClass('active').siblings().removeClass('active');
                    }

                    drawChart(dateArray, dataArray, minData, dataDegree);
                });



                var dateArray = ["09-13","09-20","09-23","09-28","10-10","10-15","10-19","10-20"],
                    dataArray = [2.526, 2.537, 2.492, 2.503, 2.511, 2.513, 2.524, 2.510],
                    minData = 2.489,
                    dataDegree = 0.013;

                drawChart(dateArray, dataArray, minData, dataDegree);

                function drawChart(dateArray, dataArray, minData, dataDegree) {
                    // echarts ======================
                    // 初始化echarts实例
                    var myChart = echarts.init(document.getElementById('echarts'));

                    // 指定图表的配置项和数据
                    // ===========  有注释的参数需要服务端参数传入 ==============
                    var option = {
                        grid: {
                            show: true,
                            borderWidth: '0',
                            left: '3%',
                            top: 20,
                            right: '7%',
                            bottom: 0,
                            containLabel: true
                        },
                        tooltip: {
                            show: true,
                            showContent: true,
                            trigger: 'axis',
                            showDelay: 20,
                            hideDelay: 20,
                            backgroundColor: '#FF614C',
                            borderRadius: 40,
                            borderWidth: 0,
                            padding: [0, 7],
                            triggerOn: 'mousemove',
                            textStyle: {
                                color: '#fff'
                            },
                            axisPointer: {
                                type: 'line',
                                lineStyle: {
                                    color: '#FF614C'
                                }
                            },
                            formatter: '{c}'
                        },
                        xAxis: [{
                            boundaryGap: false,
                            axisTick: {
                                show: false
                            },
                            data: dateArray,      // x 轴数据
                            axisLabel: {
                                interval: 0,    // 强制显示X轴所有节点
                                margin: 12,
                                textStyle: {
                                    color: '#666',
                                    fontSize: 12
                                }
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#ccc',
                                    width: 1
                                }
                            },
                            splitLine: {
                                show: true,
                                lineStyle: {
                                    color: '#eee',
                                    width: 1
                                }
                            }
                        }],
                        yAxis: [{
                            type : 'value',
                            min: minData,     //y轴最小刻度
                            // max: 2.537,  
                            interval: dataDegree, //(max - min)/4 y轴刻度间隔
                            scale: true,
                            axisTick: {
                                show: false
                            },
                            axisLabel: {
                                show: true,
                                formatter: '{value} %',
                                margin: 12,
                                textStyle: {
                                    color: '#666',
                                    fontSize: 12
                                }
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#ccc',
                                    width: 1
                                }
                            },
                            splitLine: {
                                show: true,
                                lineStyle: {
                                    color: '#eee',
                                    width: 1
                                }
                            }
                        }],
                        series: [{
                            name: '净值',
                            type: 'line',
                            symbolSize: 0,
                            lineStyle: {
                                normal: {
                                    borderColor: '#FF614C',
                                    borderWidth: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: 'rgba(255,233,230,.75)'
                                }
                            },
                            smooth: true,
                            data: dataArray   // y轴数据
                        }]
                    };

                    // 使用刚指定的配置项和数据显示图表。
                    myChart.setOption(option);
                }
            });
        </script>
    </body>
</html>